package com.donkeyx.pattern.factory.simplefactory;

import com.donkeyx.pattern.factory.Graphical;

public class GraphicalFactoryTest {

    public static void main(String[] args) throws UnSupportedShapeException {

        Graphical circular = GraphicalFactory.createGraphical("圆形");
        Graphical triangle = GraphicalFactory.createGraphical("三角形");

        circular.draw();
        triangle.draw();

        circular.erase();
        triangle.erase();

        Graphical square = GraphicalFactory.createGraphical("正方形");
    }
}
